package com.Fh.enum_;
/*
1) 声明Week枚举类，其中包含星期一至星期日的定义：
MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY,SUNDAY
2) 使用values返回所有的枚举数组,并遍历
 */
public class EnumExercise01 {
    public static void main(String[] args) {
        Week[] week = Week.values();
        System.out.println("==所有星期的信息如下==");
        for (Week w : week) {
            System.out.println(w);
        }
    }
}
enum Week{
    //声明
    MONDAY("星期一"),TUESDAY("星期二"),WEDESDAY("星期三"),THURSDAY("星期四"),FRIDAY("星期五");
    String Days;
    private Week(String Days){
        this.Days = Days;
    }

    public String getDays() {
        return Days;
    }

    @Override
    public String toString() {
        return Days;
    }
}
